<!-- xml version="1.0" encoding="utf-8" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<title>De Bello Gallico</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link href="../flashcard.css" rel="stylesheet" type="text/css">
</head>


<script type="text/javascript">
var sentences = [
  [ ["Helvetii", "iam", "per", "angustias", "et", "fines", "Sequanorum", "suas", "copias", "traduxerant"],
    ["Helvetii", "now", "through", "[the]-narrow-passes", "and", "territories", "of-Sequani", "their-own", "forces", "across-had-led"] ],
  [ ["et", "in", "Aeduorum", "fines", "pervenerant", "eorumque", "agros", "populabantur."],
    ["and", "into", "of-Aedui", "(the)-territories", "through-had-come", "of-those-and", "[the]-fields", "were-devastating."] ],
  [ ["Aedui,", "cum", "se", "suaque", "ab", "eis", "defendere", "non", "possent,", "legatos", "ad", "Caesarem", "mittunt", "rogatum", "auxilium:"],
    ["Aedui,", "since", "themselves", "their-own-also", "from", "those", "defend", "not", "they-could,", "legates", "to", "Caesar", "send", "for-the-purpose-of-asking", "aid:"] ],
  [ ["Ita", "se", "omni", "tempore", "de", "populo", "Romano", "meritos esse,", "ut", "paene", "in", "conspectu", "exercitus", "nostri", "agri", "vastari,"],
    ["So", "themselves", "in-all", "time", "from", "people", "Roman", "deserved-to-have,", "that", "almost", "in", "sight", "of-army", "our-own", "[their]_fields", "to-be-laid-waste,"] ],
  [ ["liberi", "eorum", "in", "servitutem", "abduci,", "oppida", "expugnari", "non", "debuerint."],
    ["children", "of-those", "into", "servitude", "to-be-led,", "towns", "to-be-taken-by-storm", "not", "ought."] ],
  [ ["Eodem", "tempore", "[Aedui]", "Ambarri,", "necessarii", "et", "consanguinei", "Aeduorum,"],
    ["At-same", "time", "Aedui", "Ambarri,", "close-friends", "and", "blood-relations", "of-Aedui,"] ],
  [ ["Caesarem", "certiorem", "faciunt", "sese", "depopulatis", "agris", "non", "facile", "ab", "oppidis", "vim", "hostium", "prohibere."],
    ["Caesar", "aware", "make", "themselves", "laid-waste-having-been", "fields", "not", "easily", "from", "towns", "violence", "of-enemies", "off-to-keep."] ],
  [ ["Item", "Allobroges,", "qui", "trans", "Rhodanum", "vicos", "possessionesque", "habebant,"],
    ["In-like-manner", "Allobroges,", "who", "across", "Rhone", "villages", "possessions-too", "had,"] ],
  [ ["fuga", "se", "ad", "Caesarem", "recipiunt", "et", "demonstrant", "sibi", "praeter", "agri", "solum", "nihil", "esse", "reliqui."],
    ["in-flight", "themselves", "to", "Caesar", "betake", "and", "represent", "to-themselves", "except", "of-[the]-field", "[the]-soil", "nothing", "to-be", "of-left."] ],
  [ ["Quibus", "rebus", "adductus", "Caesar", "non", "exspectandum", "sibi", "statuit,"],
    ["By-which", "things", "led", "Caesar", "(it)_not", "to-be-waited-for", "(to-be)_to-him", "determined,"] ],
  [ ["dum", "omnibus", "fortunis", "sociorum", "consumptis", "in", "Santonos", "Helvetii", "pervenirent."],
    ["till", "all", "[the]-fortunes", "of-allies", "having-been-consumed", "to", "[the]-Santones", "Helvetii", "through-should-come."] ]
];

var i = 0;
var j = 0;

var shown = 0;

function updateVoc() {
	
	var sentence = "";
	
	for(n = 0; n < sentences[i][0].length; n++) {
		if (n == j) {
			sentence += ' <span class="curword">' + sentences[i][0][n] + "</span>";
		} else {
			sentence += " " + sentences[i][0][n];
		}
	}
	
	document.getElementById('v3').innerHTML = sentence;
	
	if (shown == 0) {
		document.getElementById('v1').innerHTML = "";
	} else {
		document.getElementById('v1').innerHTML = sentences[i][1][j];
	}
}

function next() {
	shown++;
	if (shown > 1) {
		shown = 0;
		j++;
		if (j >= sentences[i][0].length) {
			j = 0;
			i++;
			if (i >= sentences.length) {
				i = 0;
				alert('All done!');
			}
		}
	}
	updateVoc();
}

function prev() {
	shown--;
	if (shown < 0) {
		shown = 1;
		j--;
		
		if (j < 0) {
			i--;
			if (i < 0) {
				i = sentences.length - 1;
				alert('All done!');
			}
			j = sentences[i][0].length - 1;
		}
	}
	
	updateVoc();
}

</script>

<body onload="updateVoc()">
<h1 style="text-align:center; color: #60B0C0;">Liber I - Caput XI</h1>

<div class="center">
<div id="v3" class="v3"></div>
<div id="v2" class="v2">&nbsp;</div>
<div id="v1" class="v1"></div>


<a href="#" class="button" id="btnprev" onclick="prev()" accesskey="p">&lt;&lt;</a>
<a href="#" class="button" id="btnnext" onclick="next()" accesskey="n">&gt;&gt;</a>


</div>
</body>
</html>
